package top.hooray.delayedpayment.service;

import top.hooray.delayedpayment.entity.Order;
import top.hooray.delayedpayment.entity.OrderStatus;

/**
 * @author hooray
 * @date 2021/3/9 22:57
 */
public interface OrderService {

    /**
     * 保存订单信息
     *
     * @param order 订单信息
     */
    void saveOrder(Order order);

    /**
     * 查询订单信息
     *
     * @param orderId     订单id
     * @param orderStatus 订单状态
     */
    void updateOrderStatus(Long orderId, OrderStatus orderStatus);

    /**
     * 根据orderId查询到订单信息
     *
     * @param orderId 订单id
     * @return 订单信息
     */
    Order findOrderById(Long orderId);
}
